// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 更新字典类型 PUT /api/dictype */
export async function updateDicType(body: API.DicTypeItem, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/dictype', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加字典类型 POST /api/dictype */
export async function addDicType(body: API.DicTypeItem, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/dictype', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}



export async function validTypeName(params: any) {
  return request('/api/dictype/validTypeName', {
    params,
  });
}